# Generated automatically from Makefile.in by configure.
# $Id: Makefile,v 1.1 2003/04/08 18:09:52 sande Exp $
# $RWC_Release: Omni-1.3s $
# $RWC_Copyright:
#  RWCP Omni Compiler Software Version 1.3s
#  Copyright (C) 1999, 2000, 2001.
#   Tsukuba Research Center, Real World Computing Partnership, Japan.
#   
#   This software is made available "as is", and the authors makes
#  no warranty about the software. 
#  IMPORTANT: Please make sure you understand the Copyright and License
#   information in the files named COPYRIGHT and LICENSE under the top
#   directory of the Omni Compiler Software release kit.
#  
#  $

SHELL=/bin/sh

SRCS = tiny01.c  tiny05.c  tiny09.c  tiny13.c  tiny18.c    tiny19-4.c  tiny22-1.c \
	tiny02.c  tiny06.c  tiny10.c  tiny14.c  tiny19-1.c  tiny19-5.c  tiny22-2.c \
	tiny03.c  tiny07.c  tiny11.c  tiny15.c  tiny19-2.c  tiny20.c    tiny22-3.c \
	tiny04.c  tiny08.c  tiny12.c  tiny16.c  tiny19-3.c  tiny21.c


prefix		=	$${OMNI_HOME:=/usr/local}
exec_prefix     =       /usr/local

CC		=	${prefix}/bin/omcc

all:	test

fullbuild:
	@for i in $(SRCS); do \
		(EXE=./`basename $$i .c`.exe; \
			rm -f $$EXE; \
			$(CC) $$i -o $$EXE); \
	done

build:
	@for i in $(SRCS); do \
		(EXE=./`basename $$i .c`.exe; \
			if test ! -x $$EXE; then \
				$(CC) $$i -o $$EXE; \
			fi); \
	done
	
test:	build
	@for i in $(SRCS); do \
		(OMP_NUM_THREADS=16; export OMP_NUM_THREADS; \
		OMP_NESTED=true; export OMP_NESTED; \
			EXE=./`basename $$i .c`.exe; NM=`basename $$i .c`; \
			if test -x $$EXE; then \
				okStr=`$$EXE 2>&1 | grep "PASSED" || true`; \
				if test ! -z "$$okStr"; then \
					echo "$$NM ...	PASSED"; \
				else \
					echo "$$NM ...	FAILED"; \
				fi; \
			else \
				exit 1; \
			fi); \
		(if test $$? -ne 0; then \
			echo "can't test `basename $$i .c`."; \
			fi); \
	done

install:
	true

clean:
	@for i in $(SRCS); do \
		(EXE=./`basename $$i .c`.exe; \
			rm -f $$EXE); \
	done
	rm -f *.o *~ core

distclean:	clean
	true

